package com.andy.eqm.server.action;

import org.springframework.stereotype.Component;

import com.andy.eqm.server.entity.ConfMake;
import com.andy.eqm.server.game.GameConf;
import com.andy.eqm.server.game.GameUser;
import com.andy.eqm.server.socket.GmAction;
import com.andy.eqm.server.socket.MySocketSession;
import com.andy.eqm.server.socket.SendUtil;
import com.andy.eqm.server.socket.codec.DataWrap;

/**
 * 合成逻辑
 * @author cuiwm
 *
 */
@Component(GmAction.ACTION_PREFIX+GmAction.ACTION_120)
public class Action120 implements IReqAction{

	@Override
	public void doAction(MySocketSession session, DataWrap data) {
		GameUser user = session.getUser();
		int itemId = data.getInt();
		ConfMake confMake = GameConf.getConfMake(itemId);
		
		if(confMake == null) return;
		
		Integer[] items = confMake.buildItem(user);
		
		SendUtil.send110(session, items);
	}


	
	
	
}
